#ifndef CONTRLLOGIC_H
#define CONTRLLOGIC_H

#include <QObject>
#include "../define.h"
#include "dbio/db_manager.h"

class ContrlLogic : public QObject
{
    Q_OBJECT
public:
    /**
     * @brief 逻辑层(ui和数据层交互)
     * @param
     */
    static ContrlLogic * getInstance(){
        return controlLogic;
    }
    void init();
    QList<DeptNode> selectDeptQuery(QString sql);
    //QList<UserInfo> selectUserQuery(QString sql);
    QList<QList<QString>> selectAllUserInfo(QString sql = SELECT_LOGIN_INFO);

    QSqlDatabase getDataDBClient();
signals:

public slots:

private:
    ContrlLogic(QObject *parent = nullptr);
private:
    static ContrlLogic * controlLogic;

};

#endif // CONTRLLOGIC_H
